package com.whp.bean;

import com.whp.service.MessageService;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.core.Ordered;

/**
 * @author wanghp
 * @version 1.0
 * @date 2020/7/8 23:19
 */

public class Message implements BeanPostProcessor {
	public Message() {
		//待会MessageServiceImpl注入Message会打印
		System.out.println("instance Message Bean");
	}


	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
		System.out.println("Message  bean:  :" + "beanName:" + beanName + "postProcessBeforeInitialization");
		return null;
	}

	@Override
	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		System.out.println("Message  bean:  :" + "beanName:" + beanName + "postProcessAfterInitialization");
		return null;
	}




}
